<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require_once(APPPATH.'models/model_kotak.php');
require_once(APPPATH.'models/pesan/pesan_masuk.php');

class kotak_masuk extends Model_kotak
{
	public static $tabel = 'inbox';

	public function __construct()
	{
		parent::__construct();
	}

	public function ambil($filter = array(), $limit=array(), $select='*', $distinct=false, $group_by="", $order_by="") {

		$hasil = parent::read($filter, $limit, $select, $distinct, $group_by, $order_by);

		$this->isi = array();

		if ($hasil===false)
			return false;
		else {
			foreach ($hasil as $data)
				$this->isi[] = new Pesan_masuk($data);
		}

		return $this->isi;
	}
}